package com.fhz.a2102high6

import com.fhz.a2102high6.test3.*
import org.junit.Test

import org.junit.Assert.*

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {
    @Test
    fun addition_isCorrect() {

        var list =  ArrayList<String>()
        list.add("1")
        list.add("2")
        list.add("3")
//        for (s in list) {
//            list.remove(s)
//        }

        val countLitter = "12AA".countLitter()
        println(countLitter)

        val money = Money(1)
        val money1 = Money(2)
        println(money.plus(money1).num)

        println("* " * 10)

//        val num1andnum2 = num1andnum2(1, 1 ::add1)
//        println(num1andnum2)
        num1andnum2(1,1) { n0, n1 ->
            n0 * n1
        }
        val stringBuilder = StringBuilder()

        val apply = stringBuilder.apply {
            append(1)
        }
        apply.append(1)

        val abc = stringBuilder.abc {
            append(12)
            append(12)
        }
        abc.append(12)

        val stringBuffer = StringBuffer()
        val abc1 = stringBuffer.abc {
            append(1)
        }
        abc1.append(1)


    }

    @Test
    fun printTest(){
        "23".print(3)
    }

}